package pers.cz.chat.filter;

import io.netty.channel.Channel;
import pers.cz.chat.constants.JefClolorEnum;
import pers.cz.chat.utils.LogUtils;
import pers.cz.netty.filter.FilterHandler;
import pers.cz.netty.filter.FilterHandlerContext;
import pers.cz.netty.protocal.Message;
import pers.cz.netty.protocal.MsgType;

/**
 * @version 1.0
 * @description: 创建群聊回复消息过滤器
 * @author: ChengZhi 0336
 * @create: 2025-05-27 16:27
 **/
public class CreateGroupReceiveFilter implements FilterHandler<Message, Channel> {

	@Override
	public boolean approve(Message message, Channel obj, FilterHandlerContext<Message,Channel> handlerContext) {

		if (MsgType.CREATEGROUP.equals(message.getMsgType())) {
			LogUtils.print(JefClolorEnum.YELLOW, "创建群聊成功！");
		}
		return handlerContext.doFilter(message, obj);
	}
}
